package com.lagou.com.lagou.homework.Modules4.item4;

import java.util.Objects;

public class UserMessage implements java.io.Serializable{

    private static final long serialVersionUID = -9029115923384571429L;

    private String check;
    private User user;

    public UserMessage() {
    }

    public UserMessage(String check, User user) {
        this.check = check;
        this.user = user;
    }

    public String getCheck() {
        return check;
    }

    public void setCheck(String check) {
        this.check = check;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "UserMessage{" +
                "check='" + check + '\'' +
                ", user=" + user +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserMessage that = (UserMessage) o;
        return /*Objects.equals(check, that.check) &&*/
                Objects.equals(user, that.user);
    }

    @Override
    public int hashCode() {
        return Objects.hash(check, user);
    }
}
